"""
@File    :   uuid_generate.py
@Time    :   2024/02/19 09:23:32
@Author  :   Qrj
@Email   :   923207736@qq.com
@description   :   UUID工具类
"""

from uuid import UUID, uuid1


class UuidUtil:
    """uuid工具类"""

    @staticmethod
    def generate_uuid1(hex: bool = True) -> UUID | str:
        """生成uuid1

        Args:
            hex (bool, optional): 是否返回hex格式

        Returns:
            UUID | str: 返回UUID对象或hex格式的字符串
        """
        if hex:
            return uuid1().hex
        else:
            return uuid1()
